package com.skins;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;

public class WebActivity extends Activity {
	/** Called when the activity is first created. */
	WebView wView;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.webpage);
		Intent in = getIntent();
		String url = in.getStringExtra("link");

		Toast.makeText(WebActivity.this, url, Toast.LENGTH_SHORT).show();
		wView = (WebView)findViewById(R.id.web);
		wView.loadUrl(url);
		
		WebSettings set = wView.getSettings();
		set.setJavaScriptEnabled(true);
		set.setBuiltInZoomControls(true);
		
		wView.setWebViewClient(new WebViewClient(){
			public boolean shouldOverrideUrlLoading(WebView view, String url)
			{
				view.loadUrl(url);
				return true;
			}
		});
	}
}
